<?php
namespace TwinPeaks\Core\Datatype;

abstract class CEnum extends CBase
{
	/**
	 * @var array
	 */
	protected $elements = [];
	
	/**
	 * @return boolean
	 */
	final function isValid()
	{
		return in_array($this->value, $this->elements);
	}
	
	/**
	 * @return string
	 */
	function getSanitizedValue()
	{
		return '';
	}
}
